<?php

 if(!empty ($peopleLike)){
        if($totalLike == 1)
            $menuName = sprintf(__('%s Person likes this', true), 1);
        else
            $menuName = sprintf(__('%s People like this', true), $totalLike);

        $hMenuName = $this->Html->tag('h2', $menuName, array('class' => 'title'));
       $seeAll = $this->Html->tag('span', $this->Html->link(__('See all', true), sprintf('/likes/viewAll/%s/%s', $companyName, $companyId)));
    //wrap people like
    $div = '';
    $push = 0;
    $likes= '';
    foreach($peopleLike as $like){
        if($like['avatar'])
            $image = $this->Html->image($like['avatar'], array('url' => '/'.$like['username']));
        else
          $image = $this->Html->image('/files/company/logo/default_48.png', array('width' => 48, 'height' => 48, 'url' => '/'.$like['username']));

        $div .= $this->Html->div('people-like-content', $image . $this->Html->link($like['name'], '/'.$like['username'], array('class' => 'text-link')));
        $push++;
        if($push == 3){
            $likes.= $this->Html->div('people-like clearfix', $div);
            $div = '';
            $push = 0;
        }

    }
    if($push > 0)
        $likes.= $this->Html->div('people-like clearfix', $div);
    //$allRelated .= $this->Html->div('related-company clearfix', $div)
    echo $this->Html->tag('div',  $hMenuName.$seeAll.$likes, array('id' => 'people-like'));
}
?>
